<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: lboxvar.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00194.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">lboxvar.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03620_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00194_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:af4e081633c3039e3e07d15288e622028"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#af4e081633c3039e3e07d15288e622028">LBGetVariableHeightItemHeight</a> (<a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a> plb, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemNumber)</td></tr>
<tr class="separator:af4e081633c3039e3e07d15288e622028"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06d026692a8ece15a048cd81e4713bce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#a06d026692a8ece15a048cd81e4713bce">LBSetVariableHeightItemHeight</a> (<a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a> plb, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemNumber, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemHeight)</td></tr>
<tr class="separator:a06d026692a8ece15a048cd81e4713bce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e0ff86ca4bc63529b37c307ef9697ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#a6e0ff86ca4bc63529b37c307ef9697ef">CItemInWindowVarOwnerDraw</a> (<a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a> plb, BOOL fPartial)</td></tr>
<tr class="separator:a6e0ff86ca4bc63529b37c307ef9697ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dfc1d163d07773b0854e456696b899e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#a3dfc1d163d07773b0854e456696b899e">LBPage</a> (<a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a> plb, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> startItem, BOOL fPageForwardDirection)</td></tr>
<tr class="separator:a3dfc1d163d07773b0854e456696b899e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade731f94bec18cb62374143bd2539924"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#ade731f94bec18cb62374143bd2539924">LBCalcVarITopScrollAmt</a> (<a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a> plb, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> iTopOld, <a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> iTopNew)</td></tr>
<tr class="separator:ade731f94bec18cb62374143bd2539924"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="a6e0ff86ca4bc63529b37c307ef9697ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e0ff86ca4bc63529b37c307ef9697ef">&#9670;&nbsp;</a></span>CItemInWindowVarOwnerDraw()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> CItemInWindowVarOwnerDraw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a>&#160;</td>
          <td class="paramname"><em>plb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fPartial</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00194_source.html">lboxvar.c</a> 第 <a class="el" href="a00194_source.html#l00101">101</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;{</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    RECT rect;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sItem;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> clientbottom;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <a class="code" href="a00365.html#a373eb8782e10ebad75e466db8d01ebe0">_GetClientRect</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, (LPRECT)&amp;rect);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    clientbottom = rect.bottom;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="comment">     * Find the number of var height ownerdraw items which are visible starting</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="comment">     * from plb-&gt;iTop.</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keywordflow">for</span> (sItem = plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>; sItem &lt; plb-&gt;cMac; sItem++) {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">         * Find out if the item is visible or not</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a>(plb, sItem, (LPRECT)&amp;rect)) {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="comment">             * This is the first item which is completely invisible, so return</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">             * how many items are visible.</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <span class="keywordflow">return</span> (sItem - plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">if</span> (!fPartial &amp;&amp; rect.bottom &gt; clientbottom) {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="comment">             * If we only want fully visible items, then if this item is</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="comment">             * visible, we check if the bottom of the item is below the client</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="comment">             * rect, so we return how many are fully visible.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">return</span> (sItem - plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a> - 1);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="comment">     * All the items are visible</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03752_source.html#l00745">_GetClientRect()</a>, <a class="el" href="a00257_source.html#l00876">tagLBIV::cMac</a>, <a class="el" href="a00257_source.html#l00869">tagLBIV::iTop</a>, <a class="el" href="a00182_source.html#l00177">LBGetItemRect()</a> , 以及 <a class="el" href="a00257_source.html#l00868">tagLBIV::spwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00182_source.html#l00474">CItemInWindow()</a>.</p>

</div>
</div>
<a id="ade731f94bec18cb62374143bd2539924"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade731f94bec18cb62374143bd2539924">&#9670;&nbsp;</a></span>LBCalcVarITopScrollAmt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> LBCalcVarITopScrollAmt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a>&#160;</td>
          <td class="paramname"><em>plb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>iTopOld</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>iTopNew</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00194_source.html">lboxvar.c</a> 第 <a class="el" href="a00194_source.html#l00198">198</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;{</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    RECT rc;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    RECT rcClient;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <a class="code" href="a00365.html#a373eb8782e10ebad75e466db8d01ebe0">_GetClientRect</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, (LPRECT)&amp;rcClient);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment">     * Just optimize redrawing when move +/- 1 item.  We will redraw all items</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment">     * if moving more than 1 item ahead or back.  This is good enough for now.</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">if</span> (iTopOld + 1 == iTopNew) {</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="comment">         * We are scrolling the current iTop up off the top off the listbox so</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="comment">         * return a negative number.</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <a class="code" href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a>(plb, iTopOld, (LPRECT)&amp;rc);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="keywordflow">return</span> (rcClient.top - rc.bottom);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordflow">if</span> (iTopOld - 1 == iTopNew) {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment">         * We are scrolling the current iTop down and the previous item is</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">         * becomming the new iTop so return a positive number.</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <a class="code" href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a>(plb, iTopNew, (LPRECT)&amp;rc);</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <span class="keywordflow">return</span> -rc.top;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">return</span> rcClient.bottom - rcClient.top;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03752_source.html#l00745">_GetClientRect()</a>, <a class="el" href="a00182_source.html#l00177">LBGetItemRect()</a> , 以及 <a class="el" href="a00257_source.html#l00868">tagLBIV::spwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00182_source.html#l01841">xxxNewITop()</a>.</p>

</div>
</div>
<a id="af4e081633c3039e3e07d15288e622028"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4e081633c3039e3e07d15288e622028">&#9670;&nbsp;</a></span>LBGetVariableHeightItemHeight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> LBGetVariableHeightItemHeight </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a>&#160;</td>
          <td class="paramname"><em>plb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>itemNumber</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00194_source.html">lboxvar.c</a> 第 <a class="el" href="a00194_source.html#l00025">25</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    BYTE itemHeight;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">int</span> offsetHeight;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>)</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            offsetHeight = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            offsetHeight = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a1a0c8a4d04c1e16bcedb6e1e4f74053e">LBODItem</a>);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a>)</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            offsetHeight += plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        offsetHeight += itemNumber;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        itemHeight = *(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>+(<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)offsetHeight);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)itemHeight;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment">     *Default, we return the height of the system font.  This is so we can draw</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment">     * the focus rect even though there are no items in the listbox.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">cySysFontChar</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00876">tagLBIV::cMac</a>, <a class="el" href="a00365_source.html#l01014">tagSERVERINFO::cySysFontChar</a>, <a class="el" href="a00257_source.html#l00908">tagLBIV::fHasStrings</a>, <a class="el" href="a00020_source.html#l00039">gpsi</a>, <a class="el" href="a00257_source.html#l00879">tagLBIV::rgpch</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00257_source.html#l00895">tagLBIV::wMultiple</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00182_source.html#l00177">LBGetItemRect()</a>, <a class="el" href="a00191_source.html#l00758">LBGetSetItemHeightHandler()</a>, <a class="el" href="a00194_source.html#l00157">LBPage()</a> , 以及 <a class="el" href="a00191_source.html#l00025">LBSetCItemFullMax()</a>.</p>

</div>
</div>
<a id="a3dfc1d163d07773b0854e456696b899e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3dfc1d163d07773b0854e456696b899e">&#9670;&nbsp;</a></span>LBPage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> LBPage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a>&#160;</td>
          <td class="paramname"><em>plb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>startItem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fPageForwardDirection</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00194_source.html">lboxvar.c</a> 第 <a class="el" href="a00194_source.html#l00157">157</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;{</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>     i;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> height;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    RECT    rc;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> == 1)</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">return</span>(0);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="a00365.html#a373eb8782e10ebad75e466db8d01ebe0">_GetClientRect</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, &amp;rc);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    height = rc.bottom;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    i = startItem;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">if</span> (fPageForwardDirection) {</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="keywordflow">while</span> ((height &gt;= 0) &amp;&amp; (i &lt; plb-&gt;cMac))</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            height -= <a class="code" href="a00194.html#af4e081633c3039e3e07d15288e622028">LBGetVariableHeightItemHeight</a>(plb, i++);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordflow">return</span>((height &gt;= 0) ? plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1 : max(i - 2, startItem + 1));</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">while</span> ((height &gt;= 0) &amp;&amp; (i &gt;= 0))</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            height -= <a class="code" href="a00194.html#af4e081633c3039e3e07d15288e622028">LBGetVariableHeightItemHeight</a>(plb, i--);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keywordflow">return</span>((height &gt;= 0) ? 0 : min(i + 2, startItem - 1));</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03752_source.html#l00745">_GetClientRect()</a>, <a class="el" href="a00257_source.html#l00876">tagLBIV::cMac</a>, <a class="el" href="a00194_source.html#l00025">LBGetVariableHeightItemHeight()</a> , 以及 <a class="el" href="a00257_source.html#l00868">tagLBIV::spwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00182_source.html#l01916">xxxInsureVisible()</a>, <a class="el" href="a00182_source.html#l02000">xxxLBoxCtlKeyInput()</a> , 以及 <a class="el" href="a00182_source.html#l00509">xxxLBoxCtlScroll()</a>.</p>

</div>
</div>
<a id="a06d026692a8ece15a048cd81e4713bce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06d026692a8ece15a048cd81e4713bce">&#9670;&nbsp;</a></span>LBSetVariableHeightItemHeight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LBSetVariableHeightItemHeight </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#a1ef0da836aee54f9d545b232ae483b05">PLBIV</a>&#160;</td>
          <td class="paramname"><em>plb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>itemNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>&#160;</td>
          <td class="paramname"><em>itemHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00194_source.html">lboxvar.c</a> 第 <a class="el" href="a00194_source.html#l00067">67</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">int</span> offsetHeight;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>)</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        offsetHeight = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        offsetHeight = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a1a0c8a4d04c1e16bcedb6e1e4f74053e">LBODItem</a>);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a>)</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        offsetHeight += plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    offsetHeight += itemNumber;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    *(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> + (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)offsetHeight) = (BYTE)itemHeight;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00876">tagLBIV::cMac</a>, <a class="el" href="a00257_source.html#l00908">tagLBIV::fHasStrings</a>, <a class="el" href="a00257_source.html#l00879">tagLBIV::rgpch</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00257_source.html#l00895">tagLBIV::wMultiple</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00191_source.html#l00758">LBGetSetItemHeightHandler()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa00182_html_ad61fcc3b7a00278894d43eb819ed5b3d"><div class="ttname"><a href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a></div><div class="ttdeci">BOOL LBGetItemRect(PLBIV plb, INT sItem, LPRECT lprc)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00177">lboxctl2.c:177</a></div></div>
<div class="ttc" id="aa01921_html_aa846f9b41c896f518fb18a97307280f2"><div class="ttname"><a href="a01921.html#aa846f9b41c896f518fb18a97307280f2">tagLBIV::cMac</a></div><div class="ttdeci">INT cMac</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00876">usercli.h:876</a></div></div>
<div class="ttc" id="aa00194_html_af4e081633c3039e3e07d15288e622028"><div class="ttname"><a href="a00194.html#af4e081633c3039e3e07d15288e622028">LBGetVariableHeightItemHeight</a></div><div class="ttdeci">INT LBGetVariableHeightItemHeight(PLBIV plb, INT itemNumber)</div><div class="ttdef"><b>Definition:</b> <a href="a00194_source.html#l00025">lboxvar.c:25</a></div></div>
<div class="ttc" id="aa00953_html_a392e62da233ed3e2f7c3fd4f487a3896"><div class="ttname"><a href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a></div><div class="ttdeci">int INT</div><div class="ttdef"><b>Definition:</b> <a href="a00953_source.html#l00006">bench.c:6</a></div></div>
<div class="ttc" id="aa00365_html_a373eb8782e10ebad75e466db8d01ebe0"><div class="ttname"><a href="a00365.html#a373eb8782e10ebad75e466db8d01ebe0">_GetClientRect</a></div><div class="ttdeci">BOOL _GetClientRect(PWND pwnd, LPRECT prc)</div><div class="ttdef"><b>Definition:</b> <a href="a03752_source.html#l00745">rtl/wow.c:745</a></div></div>
<div class="ttc" id="aa00257_html_a1a0c8a4d04c1e16bcedb6e1e4f74053e"><div class="ttname"><a href="a00257.html#a1a0c8a4d04c1e16bcedb6e1e4f74053e">LBODItem</a></div><div class="ttdeci">struct tagLBODItem LBODItem</div></div>
<div class="ttc" id="aa01921_html_a7180230449158127a3f88b1441f673f2"><div class="ttname"><a href="a01921.html#a7180230449158127a3f88b1441f673f2">tagLBIV::rgpch</a></div><div class="ttdeci">PBYTE rgpch</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00879">usercli.h:879</a></div></div>
<div class="ttc" id="aa01921_html_a9a44c9750003967e35e3e9618dbb9f9f"><div class="ttname"><a href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">tagLBIV::wMultiple</a></div><div class="ttdeci">UINT wMultiple</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00895">usercli.h:895</a></div></div>
<div class="ttc" id="aa01921_html_ab84d959c8cc5598602cd735047f91f06"><div class="ttname"><a href="a01921.html#ab84d959c8cc5598602cd735047f91f06">tagLBIV::iTop</a></div><div class="ttdeci">INT iTop</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00869">usercli.h:869</a></div></div>
<div class="ttc" id="aa01921_html_ab2a934bf9afb31afe96402ee89a76106"><div class="ttname"><a href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">tagLBIV::fHasStrings</a></div><div class="ttdeci">UINT fHasStrings</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00908">usercli.h:908</a></div></div>
<div class="ttc" id="aa00257_html_a6091781f063921fc304335d7f87acbd4"><div class="ttname"><a href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a></div><div class="ttdeci">struct tagLBItem LBItem</div></div>
<div class="ttc" id="aa01921_html_a5bd218ff1246ad262a29b369703fe78c"><div class="ttname"><a href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">tagLBIV::spwnd</a></div><div class="ttdeci">PWND spwnd</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00868">usercli.h:868</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa00020_html_ad760da1dd81d9e84dee607d18edfde39"><div class="ttname"><a href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a></div><div class="ttdeci">PSERVERINFO gpsi</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00039">clglobal.c:39</a></div></div>
<div class="ttc" id="aa02513_html_a481a03e7eb24994f1eca28391f9b7c77"><div class="ttname"><a href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">tagSERVERINFO::cySysFontChar</a></div><div class="ttdeci">int cySysFontChar</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01014">user.h:1014</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00194.html">lboxvar.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
